<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<h1>
	<fmt:message key="person.form.title" /> 
</h1>
<c:url var="url" value="/person/saveForm.html" />
<form:form action="${url}" commandName="personEntity" method="post">
	<fieldset>
		<div class="form-row">
			<label for="firstName"><fmt:message key="person.form.firstName" />:</label> 
			<span class="input"><form:input path="firstName" /></span>
		</div>
		<div class="form-row">
			<label for="lastName"><fmt:message key="person.form.lastName" />:</label> 
			<span class="input"><form:input path="lastName" /></span>
		</div>
		<div class="form-row">
			<label for="Age"><fmt:message key="person.form.age" />:</label> 
			<span class="input"><form:input path="age" /></span>
		</div>
		<div class="form-row">
			<label for="Email"><fmt:message key="person.form.email" />:</label> 
			<span class="input"><form:input path="email" /></span>
		</div>
		<div class="form-row">
			<label for="Mobile"><fmt:message key="person.form.mobile" />:</label> 
			<span class="input"><form:input path="mobile" /></span>
		</div>
		<div class="form-row">
			<label for="address"><fmt:message key="person.form.addr" />:</label> 
			<select name="all_addresses">
					<c:forEach items="${addresses}" var="address">
						<option value="${address.id}">${address.city}</option>
					</c:forEach>
				</select>
		</div>
		<div class="form-buttons">
			<div class="button">
				<input name="submit" type="submit"
					value="<fmt:message key="button.save"/>" />
			</div>
		</div>
	</fieldset>
</form:form>